﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">


    <Style x:Key="AnimatedTabItemHeader" TargetType="{x:Type TabItem}">
        <Setter Property="Margin" Value="0,-4,-2,0"/>
        <Setter Property="Width" Value="48"/>
        <Setter Property="Height" Value="128"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TabItem">
                    <Border Name="Border" CornerRadius="2" BorderBrush="Black" BorderThickness="2">
                        <Grid>
                            <StackPanel Background="Black" >
                                <Image MaxWidth="80" MaxHeight="80" Source="{Binding Tag, RelativeSource={RelativeSource FindAncestor, AncestorType=TabItem}}"/>
                                <TextBlock Background="Black" Margin="2" Foreground="SteelBlue" FontWeight="Bold" TextWrapping="WrapWithOverflow" HorizontalAlignment="Center" Text="{Binding Header, RelativeSource={RelativeSource FindAncestor, AncestorType=TabItem}}">
                              <TextBlock.LayoutTransform>
                                <RotateTransform x:Name="globalRotation" Angle="0"/>
                              </TextBlock.LayoutTransform>
                                </TextBlock>
                            </StackPanel>
                            <Rectangle x:Name="Blank" Margin="0,-2,-2,-2"  HorizontalAlignment="Right" VerticalAlignment="Center" Width="2" Height="130" Stroke="SteelBlue" Fill="SteelBlue"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="Border" Property="BorderBrush" Value="SteelBlue"/>
                            <Setter TargetName="Blank" Property="Stroke" Value="Black"/>
                            <Setter TargetName="Blank" Property="Fill" Value="Black"/>
                            <Setter TargetName="Blank" Property="Width" Value="4"/>
                            <Setter TargetName="Blank" Property="Margin" Value="0,0,-2,0"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border" Property="BorderBrush" Value="SteelBlue"/>
                        </Trigger>
                        <Trigger Property="TabItem.IsSelected" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard TargetProperty="MinWidth">
                                        <DoubleAnimation To="128" Duration="0:0:0.5"/>
                                    </Storyboard>
                                </BeginStoryboard>
                                <BeginStoryboard>
                                    <Storyboard TargetName="globalRotation" TargetProperty="Angle">
                                        <DoubleAnimation To="0" Duration="0:0:0.5"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard TargetProperty="MinWidth">
                                        <DoubleAnimation To="48" Duration="0:0:0.5"/>
                                    </Storyboard>
                                </BeginStoryboard>
                                <BeginStoryboard>
                                    <Storyboard TargetName="globalRotation" TargetProperty="Angle">
                                        <DoubleAnimation To="-90" Duration="0:0:0.5"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ProfilesBox" TargetType="{x:Type ListView}">
        <Setter Property="Background" Value="Black"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="GridView.ColumnHeaderContainerStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="FrameworkElement.Visibility" Value="Collapsed"/>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListView">
                    <WrapPanel Name="Border" Background="Black" IsItemsHost="True"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="AutoHideTextBox" TargetType="{x:Type TextBox}">
        <Setter Property="Opacity" Value="1"/>
        <Setter Property="Focusable" Value="true"/>
        <Setter Property="Cursor" Value="Arrow"/>
        <Style.Triggers>
            <Trigger Property="Text" Value="">
                <Setter Property="Opacity" Value="0"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="TaskButton" TargetType="{x:Type Button}">
        <Setter Property="Foreground" Value="SteelBlue"/>
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border 
          x:Name="Border"  
          CornerRadius="0" 
          BorderThickness="3"
          BorderBrush="Black"
          Background="Black">
                        <Grid>
                            <Grid Background="Black" VerticalAlignment="Center" HorizontalAlignment="Center" >
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="64*"/>
                                    <RowDefinition Height="45*"/>
                                </Grid.RowDefinitions>
                                <Image Source="{Binding Tag, RelativeSource={RelativeSource FindAncestor, AncestorType=Button}}"/>
                                <TextBlock Grid.Row="1" Background="Black" Foreground="SteelBlue" FontWeight="Bold" HorizontalAlignment="Center" Text="{Binding Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button}}"/>
                            </Grid>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="BorderBrush" Value="SteelBlue" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="#E0E0E0" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Border" Property="Background" Value="Black" />
                            <Setter Property="Foreground" Value="#888888"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="BookmarkIcon" TargetType="{x:Type Image}">
        <Setter Property="Focusable" Value="False"/>
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="Tag" Value="!active"/>
                </MultiTrigger.Conditions>
                <MultiTrigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard TargetProperty="Opacity">
                            <DoubleAnimation To="0.75" Duration="0:0:0.5"/>
                        </Storyboard>
                    </BeginStoryboard>
                </MultiTrigger.EnterActions>
                <MultiTrigger.ExitActions>
                    <BeginStoryboard>
                        <Storyboard TargetProperty="Opacity">
                            <DoubleAnimation To="0.25" Duration="0:0:0.5"/>
                        </Storyboard>
                    </BeginStoryboard>
                </MultiTrigger.ExitActions>
            </MultiTrigger>
            <Trigger Property="Tag" Value="active">
                <Trigger.EnterActions>
                    <BeginStoryboard Name="Setted">
                        <Storyboard TargetProperty="Opacity">
                            <DoubleAnimation To="1.0" Duration="0:0:0.5"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <RemoveStoryboard BeginStoryboardName="Setted" />
                </Trigger.ExitActions>
            </Trigger>
        </Style.Triggers>
    </Style>
    
</ResourceDictionary>